package com.sumer.psychology.photo.domain.model;

import java.io.Serializable;

/**
 * 照片ID
 * <p/>
 * User: zhenguang.zhu
 * Date: 2014/8/29
 * Time: 11:17
 */
public class PhotoId implements Serializable {
    private String identity;

    public PhotoId(String identity) {
        this.identity = identity;
    }

    public PhotoId() {
    }

    public String identity() {
        return identity;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PhotoId photoId = (PhotoId) o;

        if (identity != null ? !identity.equals(photoId.identity) : photoId.identity != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return identity != null ? identity.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "PhotoId{" +
                "identity='" + identity + '\'' +
                '}';
    }
}
